/*
 * @Author: taoyuqing
 * @Date: 2023-04-07 00:55:31
 * @Description: 
 */
import 'package:flutter/material.dart';
import 'package:spree/utils/utils.dart';

class BoxShadowContainer extends StatefulWidget {
  final Widget? child;
  final EdgeInsets? margin;
  final EdgeInsets? padding;
  BoxShadowContainer({Key? key, this.child, this.margin, this.padding})
      : super(key: key);

  @override
  State<BoxShadowContainer> createState() => _BoxShadowContainerState();
}

class _BoxShadowContainerState extends State<BoxShadowContainer> {
  @override
  Widget build(BuildContext context) {
    return Container(
      padding: widget.padding,
      margin: widget.margin,
      width: Utils().getScreenWidth(context),
      alignment: Alignment.topLeft,
      decoration: BoxDecoration(
        color: Utils().createMaterialColor(),
        boxShadow: [
          BoxShadow(
              color: Color(0xFF261E54),
              offset: Offset(0.0, 1.0),
              blurRadius: 1,
              spreadRadius: 1)
        ],
        borderRadius: BorderRadius.all(Radius.circular(5.0)),
      ),
      child: widget.child,
    );
  }
}
